#ifndef threading_Guard_h
#define threading_Guard_h

namespace serika
{
	namespace threading
	{
		template<typename LockObject>
		class Guard
		{
		public:
			Guard(LockObject& obj)
				: mObj(obj)
			{
				mObj.Acquire();
			}
			~Guard()
			{
				mObj.Release();
			}
		private:
			LockObject& mObj;
		};
	}
}

#endif
